function loadCompGrid( obj,name )

%
%     CISNE is free software: you can redistribute it and/or modify
%     it under the terms of the GNU General Public License as published by
%     the Free Software Foundation, either version 3 of the License, or
%     any later version.
%
%     CISNE is distributed in the hope that it will be useful,
%     but WITHOUT ANY WARRANTY; without even the implied warranty of
%     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%     GNU General Public License for more details.
%
%     You should have received a copy of the GNU General Public License
%     along with CISNE.  If not, see <http://www.gnu.org/licenses/>.

% Copyright 2013. Jose Maria Garcia-Valdecasas Bernal

            
if strfind(name,'cMain')
    obj.m_compGrids.(name).rect=line('Parent',obj.m_compAx,...
        'Xdata',[],'Ydata',[],'Color',...
        obj.m_cMainProp.MarkerEdgeColor,'Tag',name);
    props=obj.m_cMainProp;
else
    obj.m_compGrids.(name).rect=line('Parent',obj.m_compAx,...
        'Xdata',[],'Ydata',[],'Color',...
        obj.m_cNestProp.MarkerEdgeColor,'Tag',name);
    props=obj.m_cNestProp;
end

%create extra lines for corners.
obj.m_compGrids.(name).points.P0=line('Parent',obj.m_compAx,...
    'Xdata',[],'Ydata',[],props,'Tag',[name '-Corners'],'Visible','off');
obj.m_compGrids.(name).points.P1=line('Parent',obj.m_compAx,...
    'Xdata',[],'Ydata',[],props,'Tag',[name '-Corners'],'Visible','off');
obj.m_compGrids.(name).points.P2=line('Parent',obj.m_compAx,...
    'Xdata',[],'Ydata',[],props,'Tag',[name '-Corners'],'Visible','off');
obj.m_compGrids.(name).points.P3=line('Parent',obj.m_compAx,...
    'Xdata',[],'Ydata',[],props,'Tag',[name '-Corners'],'Visible','off');
end



